Skip to content

Implement normalised http routes - #4101

Draft
estringana wants to merge 5 commits into
masterfrom
estringana/normalise-http-route
Draft

Implement normalised http routes#4101
estringana wants to merge 5 commits into
masterfrom
estringana/normalise-http-route

Conversation

@estringana

Copy link
Copy Markdown
Contributor

Description

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

If you need to update snapshots, please refer to CONTRIBUTING.md

1 occurrences of :

- "http.status_code": "201"
+ "_dd.appsec.normalized_route": "/health_check/ping"
+ "_dd.appsec.normalized_route": "/parameterized/{param1}"
+ "_dd.appsec.normalized_route": "/simple"
+ "_dd.appsec.normalized_route": "/does_not_exist"
+ "_dd.appsec.normalized_route": "/does_not_exist"
+ "_dd.appsec.normalized_route": "/error"
+ "_dd.appsec.normalized_route": "/error"
+ "_dd.appsec.normalized_route": "/simple_view"
+ "_dd.appsec.normalized_route": "/exits"
+ "_dd.appsec.normalized_route": "/datadog-rest-service"
+ "http.status_code": "200"

1 occurrences of :

- "http.status_code": "405"
+ "_dd.appsec.normalized_route": "/datadog-rest-service/{datadog_rest_service_id}"
+ "http.status_code": "200"

1 occurrences of :

- "error.message": "Uncaught Error (500): Attempt to assign property \"b\" on null in {path}/tests/Frameworks/Laminas/ApiTools/Latest/module/DatadogApi/src/V1/Rest/DatadogRestService/DatadogRestServiceResource.php:55"
+ "error.message": "Uncaught Error: Attempt to assign property \"b\" on null in {path}/tests/Frameworks/Laminas/ApiTools/Latest/module/DatadogApi/src/V1/Rest/DatadogRestService/DatadogRestServiceResource.php:55"

1 occurrences of :

- "http.status_code": "500"
+ "_dd.appsec.normalized_route": "/datadog-rest-service/{datadog_rest_service_id}"
+ "http.status_code": "200"

2 occurrences of :

- "error.message": "Thrown Error (500): Attempt to assign property \"b\" on null in {path}/tests/Frameworks/Laminas/ApiTools/Latest/module/DatadogApi/src/V1/Rest/DatadogRestService/DatadogRestServiceResource.php:55"
+ "error.message": "Thrown Error: Attempt to assign property \"b\" on null in {path}/tests/Frameworks/Laminas/ApiTools/Latest/module/DatadogApi/src/V1/Rest/DatadogRestService/DatadogRestServiceResource.php:55"

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 10, 2026

Copy link
Copy Markdown

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

🚦 12 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | test_web_codeigniter_22: [7.0]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | ASAN test_c: [7.4, amd64]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | Unit tests: [7.0]   View in Datadog   GitLab

View all 12 failed jobs.

❄️ 49 New flaky tests detected

testCakePHPCatchAll from unit.DDTrace\Tests\Unit\Util\Normalizer\RouteNormalizerTest   View in Datadog
DDTrace\Tests\Unit\Util\Normalizer\RouteNormalizerTest::testCakePHPCatchAll
Exception: add DDTrace\Util\RouteNormalizer to bridge/_files.php or bridge/dd_register_optional_deps_autoloader.php

tests/bootstrap_common.php:47
tests/Unit/Util/Normalizer/RouteNormalizerTest.php:199
phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:52

New test introduced in this PR is flaky.

testCakePHPMixedSegment from unit.DDTrace\Tests\Unit\Util\Normalizer\RouteNormalizerTest   View in Datadog
DDTrace\Tests\Unit\Util\Normalizer\RouteNormalizerTest::testCakePHPMixedSegment
Exception: add DDTrace\Util\RouteNormalizer to bridge/_files.php or bridge/dd_register_optional_deps_autoloader.php

tests/bootstrap_common.php:47
tests/Unit/Util/Normalizer/RouteNormalizerTest.php:193
phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:52

New test introduced in this PR is flaky.

View in Flaky Test Management

ℹ️ Info

No other issues found (see more)

🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 53.53% (-7.14%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4a478ff | Docs | Datadog PR Page | Give us feedback!

estringana and others added 3 commits August 12, 2026 15:58
Add missing Tag::APPSEC_NORMALIZED_ROUTE assertions to:
- Symfony TraceSearchConfigTest (V4_4, V5_0, V5_1, V5_2, V6_2)
- Laravel TraceSearchConfigTest (V4, V5_7, V5_8, V8_x)
- Laravel V8_x RouteCachingTest and InternalExceptionsTest
- Laravel Octane CommonScenariosTest
- Yii ParameterizedRouteTest, ModuleTest, LazyLoadingIntegrationsFromYiiTest
- CodeIgniter ExitTest and NoCI_ControllertTest
- Fix UserAvailableConstantsTest tag ordering (APPSEC_NORMALIZED_ROUTE
  must appear after HTTP_ROUTE to match Tag.php declaration order)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@estringana
estringana force-pushed the estringana/normalise-http-route branch from 558693d to a3bd92e Compare August 13, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant